var express = require('express');
var router = express.Router();
const util = require('../util/common')

// 获取接口地址
var { getNavMenu,getFooter,getLinks,getIndexPic, getArticle,getArticleTalk,getArticles ,viewArticle} = require('../controller/getData')
var { setData } = require('../controller/setData')

/* GET home page. */
router.get('/', function (req, res, next) {
  res.render('index', { title: 'Express' });
});

router.get('/getIndexPic', getIndexPic)
router.get('/getFooter', getFooter)
router.get('/getLinks', getLinks)
router.get('/getArticle/:id', getArticle)
router.get('/getArticleTalk/:id', getArticleTalk)
router.post('/getArticles',getArticles)
router.post('/viewArticle/:id',viewArticle)
// 获取菜单
router.get('/getNavMenu',getNavMenu)
router.get('/setData', setData)
module.exports = router;
